<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //  es6 解决异步任务  代码编写顺序和执行顺序不一致的统一方案
        // callback  回调有缺点
        const weather=new Promise((resolve,reject)=>{
           
         resolve()
        console.log('----899----')
       
        });
        weather.then( setTimeout(()=>{
                
                console.log('--------')
            },1000)
            
        )
        .then(
           console.log('========')
        )
        console.log('++++++++++')
    </script>
</body>
</html>